package service.impl;

import mapper.SysMenusMapper;
import mapper.SysUsersMapper;
import model.SysMenus;
import model.vo.MenuVO;
import org.springframework.stereotype.Service;
import service.SysMenusService;
import util.MenuUtil;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SysMenusServiceImpl implements SysMenusService {
    @Resource
    private SysMenusMapper mapper;
    @Override
    public List<MenuVO> getMenu(Long userId) {
        List<SysMenus> list = mapper.findAll(userId);
        return new MenuUtil().getMenuVO(list);
    }
}
